package mylib.archive.y2012.m08.CPR_Beta_1;

import mylib.dir.FastInputReader;

import java.io.PrintWriter;
import java.util.Locale;

public class taskD {
    public void solve(int testNumber, FastInputReader in, PrintWriter out) {
        String[] spl = in.nextString().split("[d+]");
        int M = Integer.parseInt(spl[0]);
        int N = Integer.parseInt(spl[1]);
        int K = Integer.parseInt(spl[2]);
        int Q = in.nextInt();
        double[][] p = new double[M + 1][1010];
        p[0][0] = 1;
        for (int take = 0; take < M; ++take) {
            for (int yet = 0; yet < 1010; ++yet) {
                for (int next = 1; next <= N; ++next) {
                    if (yet + next < 1010) {
                        p[take + 1][yet + next] += p[take][yet] * 1.0 / N;
                    }
                }
            }
        }
        double ans = 0;
        for (int i = 0; i < 1010; ++i) {
            if (i + K == Q) {
                ans += p[M][i];
            }
        }
        out.printf(Locale.US, "%.10f", ans * 100);


    }
}
